﻿@{
    Layout = "_ContentLayout.cshtml";
}

@section headerBody {
<h1>Quickly setup any machine with just a Gist  - No Preinstalled software required</h1>
<p class="lead">Want to setup your box without downloading any software or fussing with package authoring or publishing?</p>
<p class="lead"><span class="text-primary">Well buckle up! Boxstarter makes this a snap!</span></p>
}
<h3>Step 1</h3>
<h4><span class="text-primary">Compose the installation script.</span></h4>
<pre>
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop

cinst fiddler4
cinst git-credential-winstore
cinst console-devel
cinst sublimetext2
cinst poshgit
cinst dotpeek

cinst Microsoft-Hyper-V-All -source windowsFeatures
cinst IIS-WebServerRole -source windowsfeatures
</pre>
<h4><span class="text-primary">Its Simply Chocolatey</span></h4>
<p>Other than the <a href="WinConfig">Boxstarter commands</a> that are imported into all Boxstarter Installation sessions, you will likely recognize this syntax if you are already familiar with Chocolatey. This script is going to configure Windows Explorer in a way that won't drive you crazy, allow you to use Remote Desktop to connect to the machine, install a handful of applications that you commonly use and install Hyper-V's virtualization host and the IIS Web Server.</p>

<p>Boxstarter can run any <a href="https://github.com/chocolatey/chocolatey/wiki/CreatePackagesQuickStart">Chocolatey package</a>. The only difference as far as the script is concerned is that your script also has access to <a href="http://boxstarter.codeplex.com/documentation?referringTitle=Quickly%20setup%20any%20machine%20with%20one%20easy%20to%20remember%20command">Boxstarter's API</a> for configuring Windows, running updates as well as logging and reboot control.</p>

<h3>Step 2</h3>
<h4><span class="text-primary">Save your script</span></h4>
<p>You have lots of options here. Boxstarter supports:</p>
<ul>
<li>Saving to as a package on any Nuget feed.</li>
<li>Saving a package to a Network share or any local media such as a thumb drive.</li>
<li>Saving to a single text file or any text based HTTP resource (like a <a href="https://gist.github.com/">Github Gist</a>)</li>
</ul>

<p>We'll stay simple here and save to a Github Gist.</p>
<img src="~/images/gist1.png"/>

<p/><p/>
<p>After saving the Gist, we'll click the "View Raw" link</p>
<img src="~/images/gist2.png"/>

<p/><p/>
<p>Now we will copy the raw URL:</p>
<img src="~/images/gist3.png"/>

<h3>Step 3</h3>
<h4><span class="text-primary">Run the script</span></h4>
<p>In either Internet Explorer (other browsers likely will not work) or from a console (CMD or PowerShell), invoke the Boxstarter launcher:</p>
<pre>
START http://boxstarter.org/package/nr/url?https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt        
</pre>
<p>Note this URL is a simple Boxstarter URL: http://boxstarter.org/package/nr/url. The /nr/ tells Boxstarter not to reboot the machine. Depending on what you are installing, you may not want to include that. Especially if you are including more heavy weight applications, frameworks or Windows Updates.</p>

<p>We add our raw Gist URL to the Boxstarter URL separated by a '?'.</p>

<p>This invokes a Boxstarter installer that will install everything according to your script. </p>
<img src="~/images/install.png"/>

<p>If not already installed, this will install Chocolatey and any of its prerequisites. If you did not include /nr/ in the Boxstarter URL, it will manage reboots and automatically log the machine back in so you do not have to attend to it throughout the installation.</p>

<h4>Other facts about the Boxstarter web installer:</h4>
<ul>
<li>You can also install any package on the public <a href="http://chocolatey.org/packages">Chocolatey.org</a> feed as well as the <a href="https://www.myget.org/gallery/boxstarter">Boxstarter community feed</a> on <a href="http://myget.org">MyGet.org</a>. To install these packages, use the package name instead of URL. So if you wanted to install FireFox, you would use http://boxstarter.org/package/nr/firefox.</li>
<li>As briefly noted above, by default the web launch URLs will not work outside of Internet Explorer or from the START command if Internet Explorer is not your default browser. You need to install a "Click-Once" extension for <a href="https://chrome.google.com/webstore/detail/clickonce-helper/mdooolbdbmjaobhdondofgdmnbidlgfh">chrome</a> or <a href="https://addons.mozilla.org/en-us/firefox/addon/microsoft-net-framework-assist/">firefox</a> to invoke the launcher.</li>        
</ul>
